package com.micmac.customer.region_map
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFormat;
	
	import mx.core.UIComponent;
	import mx.core.UITextField;
	
	public class AreaItem extends UIComponent
	{
		//private var textField:UITextField;
		public var label:String;
		
		public function AreaItem()
		{
			super();
			//this.width = 17;
			//this.height = 17;
		}
		
		override protected function createChildren():void
		{
			super.createChildren();
			
			this.graphics.clear();
			this.graphics.lineStyle(1,0xa4d7ea,4);
			//a4d7ea
			//0x7ed6ff
			this.graphics.beginFill(0xffffff,1);
			this.graphics.drawCircle(0,0,15);
			this.graphics.endFill();
			
			//textField = new UITextField();
			var textField:TextField = new TextField(  );
			textField.selectable = false;
			var textFormat:TextFormat = new TextFormat()
			textFormat.font = "Verdana";
			textFormat.color = 0x000000;
			textFormat.size = 3;
			textFormat.bold = true;
			
			textField.setTextFormat(textFormat);
			
			textField.text = label;
			textField.width = 25;
			textField.height=20;
			
			
				
			this.addChild(textField);
			
			textField.x = (this.width - textField.width)/2;
			textField.y = (this.height - textField.height)/2;
		}
	}
}